<?php
namespace Game\Action\Character;

use Game\Action\AbstractAction;
use Game\Entity\Character as EntityCharacter;

class KickAction extends AbstractAction
{
    public function __construct()
    {
        $this->_code = 'kick';
    }

    public function execute($character)
    {
        $owner = $this->getOwner();
        $owner instanceof EntityCharacter;

        $hp = $character->getHp();
        $damage = $owner->getBaseDamage();
        $hp = $hp - $damage;
        $character->setHp($hp);
        return sprintf('%s kiks %s with %s damage', $this->getOwner()->getName(), $character->getName(), $damage);
    }

    public function render()
    {

    }

}